#include "array.h"

const int size = 10;
const int middle = size/2;

int main()
{
	array first(size);

	std::cout << "array size = " << first.get_size() << std::endl
	          << first << std::endl << std::endl
	          << "lets fill array:" << std::endl;

	for (int i = 0; i < size; i++)
		first[i] = i;

	std::cout << first << std::endl << std::endl
	          << "test copy constructor:" << std::endl;

	array second = first;

	std::cout << second << std::endl << std::endl
	          << "and now lets test set and get functions" << std::endl
	          << "double element in a " <<  middle << std::endl;

	second.set(middle, second.get(middle)*2);

	std::cout << second << std::endl << std::endl
	          << "lets test operator=" << std::endl
	          << (first = second) << std::endl << std::endl
	          << "and now lets try access to position out of array" << std::endl;

	std::cout << first.get(size);

	return 0;
}
